/**
 * 用户相关接口
 */
import request from '@/utils/request'

/**
 * @description  账号登陆
 * @param {String} account 用户名
 * @param {String} password 密码
 * @return Promise
 */
export const userAccountLogin = ({ account, password }) => {
  return request('/login', 'post', { account, password })
}

/**
 * @description: 短信登陆
 * @param {String} mobile 手机号
 * @param {String} code 验证码
 * @return Promise
 */
export const userMobileLogin = ({ mobile, code }) => {
  return request('/login/code', 'post', { mobile, code })
}

/**
 * @description: 获取短信登录验证码
 * @param {String} mobile 手机号
 * @return {*} Promise
 */
export const userMobileLoginMsg = mobile => {
  return request('/login/code', 'get', { mobile })
}
